config := meta.(*Config)

zone, err := getZone(d, config)
if err != nil {
	return nil, err
}

if zone == "" {
	return nil, fmt.Errorf("zone must be non-empty - set in resource or at provider-level")
}

// API Endpoint requires region in the URL. We infer it from the zone.

region := getRegionFromZone(zone)

if region == "" {
	return nil, fmt.Errorf("invalid zone %q, unable to infer region from zone", zone)
}

return obj, nil